from django.shortcuts import render
from django.http import HttpResponse

from user.models import *
# Create your views here.
# 视图views

def index(request):
    # 返回网页响应
    return render(request, 'index.html')

def index2(request):
    # 返回响应
    return HttpResponse("Hello, Django!")


def get_user(request):
    # 获取所有用户
    users = UserModel.objects.all()
    # 返回响应
    return render(request, 'user.html', {'users': users})
